package com.example.oss.returns;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Result<T> {

	/**
	 * 状态码
	 */
	private Integer code;
	/**
	 * 返回信息
	 */
	private String message;
	/**
	 * 返回数据
	 */
	private T data;

	public Result(){
	}

	public Result(String message) {
		this.message = message;
	}

	public Result(T data) {
		this.data = data;
	}

	public Result(String message, T data) {
		this.message = message;
		this.data = data;
	}

	public Result(Integer code, String message, T data) {
		this.code = code;
		this.message = message;
		this.data = data;
	}
}
